﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace djpp.UtilsForm
{
    public partial class CreateProjectForm : Form
    {
        public CreateProjectForm()
        {
            InitializeComponent();
        }

        private void OpenBrowser(object sender, EventArgs e)
        {
            if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
            {
                prj_path.Text = folderBrowserDialog1.SelectedPath;
            }
        }

        private void Data_Changed(object sender, EventArgs e)
        {
            Update();
        }

        private void CloseForm(object sender, EventArgs e)
        {
            Close();
        }

        private new void Update()
        {
            if (prj_name.Text.Equals("") || prj_path.Text.Equals(""))
            {
                ok_btn.Enabled = false;
            }
            else
            {
                ok_btn.Enabled = true;
            }            
        }

        public string GetName()
        {
            return prj_name.Text;
        }

        public string GetPath()
        {
            return prj_path.Text;
        }
    }
}
